package com.itheima.sh.user.feign;

import com.itheima.sh.pojo.Order;
import com.itheima.sh.user.feign.fallback.OrderFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @Description:
 * @Version: V1.0
 */
@FeignClient(value = "order-server",fallback = OrderFeignFallback.class)
public interface OrderApi {

    // 请求url 参数 返回值 和服务提供方保持一致
    @GetMapping("order/findOrderByUserId")
    public List<Order> findOrderByUserId(@RequestParam("username") String username);
}
